/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { Component } from '@ohos/sdkmanager-common';
import * as path from 'path';

/**
 * hos sdk公共实例
 *
 * @since 2021-4-18
 */
export class HosSdkComponent {
  private readonly _baseDir: string;
  private readonly _component: Component;

  constructor(component: Component, type: string) {
    this._component = component;
    this._baseDir = path.resolve(component.getLocation()!, type);
  }

  getBaseDir(): string {
    return this._baseDir;
  }

  getComponent(): Component {
    return this._component;
  }
}
